package com.lyrcsoft;

import com.lyrcsoft.autoconfigure.DataBaseType;
import com.lyrcsoft.autoconfigure.EnableDataBaseClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@EnableDataBaseClient
@PropertySource("database.properties")
public class SpringbootSpiApplication {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
        ctx.register(SpringbootSpiApplication.class);
        ctx.refresh();
        System.out.println(ctx.getBean(DataBaseType.class));
    }

}
